﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Tedds_Tool
{
    public interface IScriptFinder
    {
        TextReader FindPrecondition(string name);
        TextReader FindImplication(string name);
        TextReader FindConsequence(string name);
        TextReader FindRuleBase(string name);
        TextReader FindRule(string name);

        [Obsolete("FindTestScript is obsolete please use Find(AcceptanceTest|BuisnessLogic|RawUIScript) instead.", false)]
        TextReader FindTestScript(string name);

        TextReader FindAcceptanceTest(string name);
        TextReader FindBuisnessLogic(string name);
        TextReader FindRawUIScript(string name);
        

        TextWriter CreatePrecondition(string name);
        TextWriter CreateAction(string name);
        TextWriter CreateConsequence(string name);
        TextWriter CreateRuleBase(string name);
        TextWriter CreateRule(string name);

        [Obsolete("CreateTestScript is obsolete please use Create(AcceptanceTest|BuisnessLogic|RawUIScript) instead.", false)]
        TextWriter CreateTestScript(string name);

        TextWriter CreateAcceptanceTest(string name);
        TextWriter CreateBuisnessLogic(string name);
        TextWriter CreateRawUIScript(string name);

        TextWriter WriteTestClass(string name);
        
        IEnumerable<String> ListPreconditions();
        IEnumerable<String> ListActions();
        IEnumerable<String> ListConsequences();
        IEnumerable<String> ListRuleBases();
        IEnumerable<String> ListRules();

        [Obsolete("ListTestScripts is obsolete please use List(AcceptanceTest|BuisnessLogic|RawUIScript) instead.", false)]
        IEnumerable<String> ListTestScripts();

        IEnumerable<String> ListAcceptanceTest();
        IEnumerable<String> ListBuisnessLogic();
        IEnumerable<String> ListRawUIScript();
        
        void DeleteRule(string oldName);
    }
}
